﻿Type=Class
Version=5.5
ModulesStructureVersion=1
B4A=true
@EndOfDesignText@
'Class module
Sub Class_Globals
	
End Sub

'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize

End Sub
'传入百十个三位的参数例如大单为1010 小双为0101
Public Sub filter(sb As String,ss As String,sg As String) As List
	Dim lstb,lsts,lstg,lstret As List
	lstb.Initialize
	Select sb
		Case "0101"
			'小双
			lstb.AddAll(Array As Int(0,2,4))
		Case "0110"
			'小单
			lstb.AddAll(Array As Int(1,3))
		Case "1001"
			'大双
			lstb.AddAll(Array As Int(6,8))
		Case "1010"
			'大单
			lstb.AddAll(Array As Int(5,7,9))
		Case "1000"
			'大
			lstb.AddAll(Array As Int(5,6,7,8,9))
		Case "0100"
			'小
			lstb.AddAll(Array As Int(0,1,2,3,4))
		Case "0010"
			'单
			lstb.AddAll(Array As Int(1,3,5,7,9))
		Case "0001"
			'双
			lstb.AddAll(Array As Int(0,2,4,6,8))
		Case Else
			ToastMessageShow("百位参数非法",True) 
			Return Null
	End Select
	lsts.Initialize
	Select ss
		Case "0101"
			'小双
			lsts.AddAll(Array As Int(0,2,4))
		Case "0110"
			'小单
			lsts.AddAll(Array As Int(1,3))
		Case "1001"
			'大双
			lsts.AddAll(Array As Int(6,8))
		Case "1010"
			'大单
			lsts.AddAll(Array As Int(5,7,9))
		Case "1000"
			'大
			lsts.AddAll(Array As Int(5,6,7,8,9))
		Case "0100"
			'小
			lsts.AddAll(Array As Int(0,1,2,3,4))
		Case "0010"
			'单
			lsts.AddAll(Array As Int(1,3,5,7,9))
		Case "0001"
			'双
			lsts.AddAll(Array As Int(0,2,4,6,8))
		Case Else
			ToastMessageShow("十位参数非法",True) 
			Return Null
	End Select
	lstg.Initialize
	Select sg
		Case "0101"
			'小双
			lstg.AddAll(Array As Int(0,2,4))
		Case "0110"
			'小单
			lstg.AddAll(Array As Int(1,3))
		Case "1001"
			'大双
			lstg.AddAll(Array As Int(6,8))
		Case "1010"
			'大单
			lstg.AddAll(Array As Int(5,7,9))
		Case "1000"
			'大
			lstg.AddAll(Array As Int(5,6,7,8,9))
		Case "0100"
			'小
			lstg.AddAll(Array As Int(0,1,2,3,4))
		Case "0010"
			'单
			lstg.AddAll(Array As Int(1,3,5,7,9))
		Case "0001"
			'双
			lstg.AddAll(Array As Int(0,2,4,6,8))
		Case Else
			ToastMessageShow("十位参数非法",True) 
			Return Null
	End Select
	lstret.Initialize
	For i=0 To lstb.Size-1
		For j=0 To lsts.Size-1
			For k=0 To lstg.Size-1
				Dim st As String=lstb.Get(i)&lsts.Get(j)&lstg.Get(k)
				lstret.Add(st)
			Next
		Next
	Next
	lstret.Sort(True)
	Return lstret
End Sub
public Sub replacenotogz(no As String,direct As Boolean) As String
	Dim ret As String=no
	If direct Then
		ret=ret.Replace("0","[丑未]").Replace("1","子").Replace("2","巳").Replace("3","寅").Replace("4","酉").Replace("5","[辰戌]").Replace("6","亥").Replace("7","午").Replace("8","卯").Replace("9","申")
	Else
		ret=ret.Replace("0","[辰戌]").Replace("1","亥").Replace("2","午").Replace("3","卯").Replace("4","申").Replace("5","[丑未]").Replace("6","子").Replace("7","巳").Replace("8","寅").Replace("9","酉")
	End If
	Return ret
End Sub

